import type { ColumnsType } from 'antd/es/table';

export interface DataType {
	id: string;
	name: string;
	age: number;
	address: string;
	status: number;
	children?: DataType[];
}

export const columns: ColumnsType<DataType> = [
	{ title: 'Name', key: 'name', dataIndex: 'name' },
	{ title: 'Age', key: 'age', dataIndex: 'age' },
	{ title: 'Address', key: 'address', dataIndex: 'address', fixed: 'right', width: 300 }
];

export const list: DataType[] = [
	{
		id: '123123',
		name: 'John Brown',
		age: 32,
		address: 'London No. 0 Lake Park',
		status: 0
	},
	{
		id: '234234',
		name: 'Jim Green',
		age: 42,
		address: 'London No. 1 Lake Park',
		status: 0
	},
	{
		id: '456456',
		name: 'Joe Black',
		age: 32,
		address: 'Sidney No. 1 Lake Park',
		status: 0
	}
];

export const listChildren: DataType[] = [
	{
		id: '123123',
		name: 'John Brown',
		age: 32,
		address: 'London No. 0 Lake Park',
		status: 0,
		children: [
			{
				id: '234234',
				name: 'Jim Green',
				age: 42,
				address: 'London No. 1 Lake Park',
				status: 0,
				children: [
					{
						id: '456456',
						name: 'Joe Black',
						age: 32,
						address: 'Sidney No. 1 Lake Park',
						status: 0
					}
				]
			}
		]
	}
];
